
public class HW6_2SP1 {

	   
	public static void main(String args[])
	   {
	      int[][] grade={{83,90,76,83},{68,88,92,60},{79,93,67,91}};
	      String str1="average of days:";
	      String str2="average of course:";
	      
	      for(int i=0;i<grade.length;i++)
	      {               
	         int sum1=0;
	         for(int j=0;j<grade[i].length;j++)
	         {
	            
	            System.out.print(grade[i][j]+" ");
	            sum1+=grade[i][j];
	         }            
	            
	         str1+=(sum1/grade[i].length)+"  ";   
	      }
	      
	      System.out.println();
	      
	      for(int j=0;j<4;j++)
	      {      
	         int sum2=0;
	         for(int i=0;i<3;i++)
	         {
	            System.out.print(grade[i][j]+" ");
	            sum2+=grade[i][j];
	         }            
	                     
	         str2+=(sum2/3)+"  ";      
	      }     
	         
	      System.out.println("\n\n"+str1+"\n"+str2);       
	   }
	   
}
